#!/usr/bin/python3
# -*- coding: UTF-8 -*-
from re import M


total = 0


def sum(arg1, arg2):
    total = arg1 + arg2
    print("函数内：", total)
    return total
sum(10, 20)
print("函数外：", total)


print("如果要给全局变量在一个函数里赋值，必须使用global语句。")
Money = 2000

def AddMoney():
    global Money 
    Money = Money + 1
AddMoney()
print(Money)
